/*
 *  newgame_window.h
 */

#ifndef NEW_GAME_WINDOW_H
#define NEW_GAME_WINDOW_H

#include <gtkmm.h>
#include <gtkmm/window.h>
#include <string>
#include "campaign_record.h"
#include "client_app.h"
#include "client_window.h"
#include "startgame_window.h"

class NewGameWindow: public ClientWindow {
public:
    NewGameWindow(BaseObjectType* object,
			      const Glib::RefPtr<Gtk::Builder>& builder);
	virtual ~NewGameWindow();
    void onCreateGame();
    void onCancel();
    virtual void notifyGameCreateOk(ClientApp* app);
    void setApp(ClientApp* app);
    void loadData();
    void setLobbyWindow(Gtk::Window* window);
protected:
	StartGameWindow* winStartGame;
    Gtk::Entry* eGameName;
	Gtk::Button* btnCreateGame;
	Gtk::Button* btnCancel;
	Glib::RefPtr<Gtk::ListStore> list_store;
    Gtk::TreeView* tv_campaigns;
	CampaignRecord campaign_record;

/*
protected:

	Gtk::Image* PreviewImage;

public:
	
	void ChangePreviewImage();
*/
private:
	void createCampaingTreeView(const Glib::RefPtr<Gtk::Builder>& builder);
    bool tv_loaded;
    Gtk::Window* winLobby;
};

#endif  //NEW_GAME_WINDOW_H

//{+}


